home *** CD-ROM | disk | FTP | other *** search
/ MacGames Sampler / PHT MacGames Bundle.iso / MacSource Folder / Samples from the CD / Assembly / Mac68k / MANUAL / MAN10.DOC < prev    next >
Encoding:
Text File  |  1985-08-11  |  10.3 KB  |  461 lines  |  [TEXT/Anon]

  1.  
  2. MAC.68K
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.                                SPACE
  10.                                SPACE
  11.                                SPACE
  12.  
  13.  
  14.  
  15.  
  16.  
  17.   PURPOSE         To insert blank lines into the output listing.
  18.  
  19.  
  20.  
  21.  
  22.  
  23.   FORMAT               SPACE  linecount
  24.  
  25.  
  26.  
  27.              subhead   SPACE  linecount,minpage
  28.  
  29.  
  30.  
  31.  
  32.  
  33.   DESCRIPTION     SPACE inserts linecount number of blank lines into
  34.  
  35.  
  36.                an output listing. If a new page just began or if a
  37.  
  38.  
  39.                page boundary is crossed while inserting blank lines,
  40.  
  41.  
  42.                the insertion stops and no blank lines are put on the
  43.  
  44.  
  45.                new page. The sub heading field in page heading line 2
  46.  
  47.  
  48.                is reset with the subhead value.
  49.  
  50.  
  51.  
  52.                    The optional minpage parameter specifies the
  53.  
  54.  
  55.                minimum number of lines that must be available on the
  56.  
  57.  
  58.                current page after the SPACE takes effect. If there
  59.  
  60.  
  61.                are less than minpage lines left a page eject is
  62.  
  63.  
  64.                forced.
  65.  
  66.  
  67.  
  68.                    The location field of SPACE is used as the new
  69.  
  70.  
  71.                subheading field in the second line of the page
  72.  
  73.  
  74.                heading.
  75.  
  76.  
  77.  
  78.  
  79.  
  80.   EXAMPLES             SPACE   4
  81.  
  82.  
  83.                SUBR    SPACE   4,10
  84.  
  85.  
  86.  
  87.  
  88.  
  89.  
  90.  
  91.  
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.                               -59-                              MAC.68K
  109.  
  110.  
  111.  
  112.                                                                 MAC.68K
  113.  
  114.  
  115.  
  116.  
  117.  
  118.                                STEXT
  119.                                STEXT
  120.                                STEXT
  121.  
  122.  
  123.  
  124.  
  125.   PURPOSE         To specify a macro and symbol definition assembly.
  126.  
  127.  
  128.                The object file is generated with a .STX file extension.
  129.  
  130.  
  131.  
  132.  
  133.   FORMAT               STEXT
  134.  
  135.  
  136.  
  137.  
  138.   DESCRIPTION     STEXT is an initialization directive. It must
  139.  
  140.  
  141.                appear after the IDENT card but before any
  142.  
  143.  
  144.                noninitialization operation codes. STEXT generates the
  145.  
  146.  
  147.                .STX files used with INCLUDES.
  148.  
  149.  
  150.  
  151.                    An STEXT assembly reduces symbol and macro
  152.  
  153.  
  154.                definitions from text format to a MAC.68K table
  155.  
  156.  
  157.                format. In this format the symbols and macros can be
  158.  
  159.  
  160.                loaded considerably faster using INCLUDES than by
  161.  
  162.  
  163.                loading them in text form with an INCLUDE.
  164.  
  165.  
  166.  
  167.                    Local symbols ..0000 to ..FFFF, qualified symbols
  168.  
  169.  
  170.                (see QUAL), and any symbols or macros defined by an
  171.  
  172.  
  173.                INCLUDES are not written to the .STX file.  DATA and
  174.  
  175.  
  176.                BSS may not be used within an STEXT assembly.
  177.  
  178.  
  179.  
  180.  
  181.  
  182.  
  183.  
  184.  
  185.  
  186.                               STOPDUP
  187.                               STOPDUP
  188.                               STOPDUP
  189.  
  190.  
  191.  
  192.  
  193.  
  194.   PURPOSE         To cause early termination an ECHO or DUP.
  195.  
  196.  
  197.  
  198.  
  199.  
  200.   FORMAT               STOPDUP
  201.  
  202.  
  203.  
  204.  
  205.  
  206.   DESCRIPTION     STOPDUP terminates a DUP or ECHO block by setting
  207.  
  208.  
  209.                the outstanding duplication count to zero. The current
  210.  
  211.  
  212.                DUP/ECHO block finishes and any unfinished
  213.  
  214.  
  215.                duplications are cancelled.
  216.  
  217.  
  218.  
  219.  
  220.  
  221.  
  222.  
  223.  
  224.  
  225.  
  226.  
  227.  
  228. MAC.68K                                  -60-
  229.  
  230.  
  231.  
  232. MAC.68K
  233.  
  234.  
  235.  
  236.  
  237.  
  238.                                STRDEC
  239.                                STRDEC
  240.                                STRDEC
  241.  
  242.  
  243.  
  244.  
  245.   PURPOSE         To convert a value into a decimal STRING.
  246.  
  247.  
  248.  
  249.  
  250.   FORMAT        stringname   STRDEC  expression,len
  251.  
  252.  
  253.  
  254.  
  255.   DESCRIPTION     STRDEC converts expression into a decimal character
  256.  
  257.  
  258.                string and assigns the string value to stringname. The
  259.  
  260.  
  261.                decimal value may be any positive value less than 64K,
  262.  
  263.  
  264.                and the character string will be 1 to 5 characters in
  265.  
  266.  
  267.                length with leading zero suppression. The optional
  268.  
  269.  
  270.                field len may be used to create a fixed length string
  271.  
  272.  
  273.                with leading zero fill.
  274.  
  275.  
  276.  
  277.  
  278.   EXAMPLE       LEN    SET      LEN+1
  279.  
  280.  
  281.                 LENS   STRDEC   LEN
  282.  
  283.  
  284.                 LENMSG DC.B     'LENGTH REACHED "LENS"'
  285.  
  286.  
  287.  
  288.  
  289.  
  290.  
  291.  
  292.  
  293.                                STRHEX
  294.                                STRHEX
  295.                                STRHEX
  296.  
  297.  
  298.  
  299.  
  300.   PURPOSE         To convert a value into a hex STRING.
  301.  
  302.  
  303.  
  304.  
  305.   FORMAT        stringname   STRHEX  expression,len
  306.  
  307.  
  308.  
  309.  
  310.   DESCRIPTION     STRHEX converts expression into a hex character
  311.  
  312.  
  313.                string and assigns the string value to stringname. The
  314.  
  315.  
  316.                character string will be 1 to 8 characters in length
  317.  
  318.  
  319.                with leading zero suppression. The optional field len
  320.  
  321.  
  322.                may be used to create a fixed length string with
  323.  
  324.  
  325.                leading zero fill.
  326.  
  327.  
  328.  
  329.  
  330.   EXAMPLE       LEN    SET      LEN+1
  331.  
  332.  
  333.                 LENS   STRHEX   LEN
  334.  
  335.  
  336.                 LENMSG DC.B     'LENGTH REACHED $"LENS"'
  337.  
  338.  
  339.  
  340.  
  341.  
  342.  
  343.  
  344.  
  345.  
  346.  
  347.  
  348.  
  349.  
  350.                               -61-                              MAC.68K
  351.  
  352.  
  353.  
  354.                                                                 MAC.68K
  355.  
  356.  
  357.  
  358.  
  359.  
  360.                                STRING
  361.                                STRING
  362.                                STRING
  363.  
  364.  
  365.  
  366.  
  367.  
  368.   PURPOSE         To define a character string.
  369.  
  370.  
  371.  
  372.  
  373.  
  374.   FORMAT     stringname   STRING   startchar,len,dstringd
  375.  
  376.  
  377.  
  378.  
  379.  
  380.   DESCRIPTION     STRING defines or redefines a named character
  381.  
  382.  
  383.                string that may be substituted into a source line when
  384.  
  385.  
  386.                referenced by "stringname". The parameter startchar is
  387.  
  388.  
  389.                an expression that specifies the starting character to
  390.  
  391.  
  392.                use in the delimited string dstringd. The parameter
  393.  
  394.  
  395.                len is an expression that specifies the length of the
  396.  
  397.  
  398.                string. d is the string delimiter character and may be
  399.  
  400.  
  401.                any character not occuring in the string other than &
  402.  
  403.  
  404.                or ".
  405.  
  406.  
  407.  
  408.                    If startchar is null or zero the micro name is
  409.  
  410.  
  411.                assigned a null value.  If len is null or zero or
  412.  
  413.  
  414.                greater than the available string length, the actual
  415.  
  416.  
  417.                string length is used.
  418.  
  419.  
  420.  
  421.  
  422.  
  423.   EXAMPLES
  424.  
  425.  
  426.            AA    STRING   1,,*ABCD*
  427.  
  428.  
  429.                  MOVE.L   #'"AA"',D0     becomes     MOVE.L  #'ABCD',D0
  430.  
  431.  
  432.  
  433.            BB    STRING   1,,+"AA"EFGH+
  434.  
  435.  
  436.                  DC.L   8H"BB"           becomes     DC.L    8HABCDEFGH
  437.  
  438.  
  439.  
  440.            CC    STRING   1,1,@A1+TAG
  441.  
  442.  
  443.                  IFS      EQ,*"CC"*@*    becomes     IFS     EQ,*@*@*
  444.  
  445.  
  446.  
  447.  
  448.  
  449.  
  450.  
  451.  
  452.  
  453.  
  454.  
  455.  
  456.  
  457.  
  458.  
  459.  
  460.  
  461.  
  462.  
  463.  
  464.  
  465.  
  466. MAC.68K                                  -62-
  467.  
  468.  
  469.  
  470. MAC.68K
  471.  
  472.  
  473.  
  474.  
  475.  
  476.                                STRLEN
  477.                                STRLEN
  478.                                STRLEN
  479.  
  480.  
  481.  
  482.  
  483.  
  484.   PURPOSE         To determine a string length and set a redefinable
  485.  
  486.  
  487.                symbol to that value.
  488.  
  489.  
  490.  
  491.  
  492.  
  493.   FORMAT     symbol    STRLEN  stringname
  494.  
  495.  
  496.  
  497.  
  498.  
  499.   DESCRIPTION     STRLEN sets the value of symbol to the current
  500.  
  501.  
  502.                length in characters of stringname. If an error is
  503.  
  504.  
  505.                encountered, symbol is not (re)defined.
  506.  
  507.  
  508.  
  509.  
  510.  
  511.   EXAMPLE
  512.  
  513.  
  514.  
  515.           SLEN   MACROL  NAME,P1
  516.  
  517.  
  518.           AA     STRING  1,,*P1*
  519.  
  520.  
  521.           NAME   STRLEN  AA
  522.  
  523.  
  524.                  ENDM
  525.  
  526.  
  527.  
  528.           BB     SLEN   A1         sets  BB to 2
  529.  
  530.  
  531.           BB     SLEN   (A1)       sets  BB to 4
  532.  
  533.  
  534.           BB     SLEN   FOO-10     sets  BB to 6
  535.  
  536.  
  537.           BB     SLEN   OOP*S      sets  BB to 3  (string delimiter *
  538.  
  539.  
  540.                                          appears in parameter)
  541.  
  542.  
  543.  
  544.  
  545.  
  546.  
  547.  
  548.  
  549.  
  550.  
  551.  
  552.  
  553.  
  554.  
  555.  
  556.  
  557.  
  558.  
  559.  
  560.  
  561.  
  562.  
  563.  
  564.  
  565.  
  566.  
  567.  
  568.  
  569.  
  570.                               -63-                              MAC.68K
  571.  
  572.  
  573.  
  574.                                                                 MAC.68K
  575.  
  576.  
  577.  
  578.  
  579.  
  580.                                SUBTTL
  581.                                SUBTTL
  582.                                SUBTTL
  583.  
  584.  
  585.  
  586.  
  587.   PURPOSE         To set a program listing subtitle.
  588.  
  589.  
  590.  
  591.  
  592.   FORMAT               SUBTTL  subtitle string
  593.  
  594.  
  595.  
  596.  
  597.   DESCRIPTION     SUBTTL sets the 32 character subtitle field in the
  598.  
  599.  
  600.                optional line 2 of the page heading. The first TITLE
  601.  
  602.  
  603.                or SUBTTL in the program also sets the 32 character
  604.  
  605.  
  606.                title field in line 1 of the page heading. If listing
  607.  
  608.  
  609.                is active, SUBTTL forces a new page.
  610.  
  611.  
  612.  
  613.  
  614.  
  615.  
  616.  
  617.  
  618.                                 TEXT
  619.                                 TEXT
  620.                                 TEXT
  621.  
  622.  
  623.  
  624.  
  625.   PURPOSE         To change the assembly to the text segment.
  626.  
  627.  
  628.  
  629.  
  630.   FORMAT               TEXT
  631.  
  632.  
  633.  
  634.  
  635.   DESCRIPTION     TEXT changes the current assembly segment to the
  636.  
  637.  
  638.                text segment.
  639.  
  640.  
  641.  
  642.  
  643.  
  644.  
  645.  
  646.  
  647.                                TITLE
  648.                                TITLE
  649.                                TITLE
  650.  
  651.  
  652.  
  653.  
  654.   PURPOSE         To set a program listing title.
  655.  
  656.  
  657.  
  658.  
  659.   FORMAT               TITLE  title string
  660.  
  661.  
  662.  
  663.  
  664.   DESCRIPTION     TITLE sets the 32 character title field in line 1
  665.  
  666.  
  667.                of the page heading.
  668.  
  669.  
  670.  
  671.  
  672.  
  673.  
  674.  
  675.  
  676.  
  677.  
  678.  
  679.  
  680. MAC.68K                                  -64-
  681.  
  682.  
  683.  
  684. MAC.68K
  685.  
  686.  
  687.  
  688.  
  689.  
  690.                                 VFD
  691.                                 VFD
  692.                                 VFD
  693.  
  694.  
  695.  
  696.  
  697.  
  698.   PURPOSE         To generate data in a user selected bit-width field.
  699.  
  700.  
  701.  
  702.  
  703.  
  704.   FORMAT          VFD    width1/expression
  705.  
  706.  
  707.         symbol    VFD    width1/expression,width2/expression,...
  708.  
  709.  
  710.  
  711.  
  712.  
  713.   DESCRIPTION     VFD generates data within fields of 1 to 32 bits.
  714.  
  715.  
  716.                If the value of the expression does not fit within the
  717.  
  718.  
  719.                field the result is truncated and a source line error
  720.  
  721.  
  722.                type 7 occurs.
  723.  
  724.  
  725.  
  726.                    VFD is the only data or CPU operation code not
  727.  
  728.  
  729.                automatically forced to an even byte or word boundary.
  730.  
  731.  
  732.                VFD bit fields are packed left to right within a byte
  733.  
  734.  
  735.                and may straddle a byte boundary. Use of the optional
  736.  
  737.  
  738.                symbol field advances the assembler to the next byte
  739.  
  740.  
  741.                boundary before processing the first bit field.
  742.  
  743.  
  744.  
  745.  
  746.  
  747.   EXAMPLES     TABLE   VFD     3/TYPE,15/L*A*
  748.  
  749.  
  750.                        VFD     1/0
  751.  
  752.  
  753.                        VFD     4/FOO-3,9/BAZ,23/ADDR-TABLE
  754.  
  755.  
  756.  
  757.  
  758.  
  759.  
  760.  
  761.  
  762.  
  763.  
  764.  
  765.  
  766.  
  767.  
  768.  
  769.  
  770.  
  771.  
  772.  
  773.  
  774.  
  775.  
  776.  
  777.  
  778.  
  779.  
  780.  
  781.  
  782.  
  783.  
  784.                               -65-                              MAC.68K
  785.  
  786.  
  787. 
  788.  
  789.  
  790.  
  791.  
  792.  
  793.  
  794.  
  795.  
  796.  
  797.  
  798.  
  799.  
  800.  
  801.  
  802.  
  803.  
  804.  
  805.  
  806.  
  807.  
  808.  
  809.  
  810.  
  811.  
  812.  
  813.                               -65-